﻿
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace EvaluationSystem.Models
{
    [Table("course")]
    public class Course
    {
        [Key,Column("id")]
        public int CourseId { get; set; }

        public string Name { get; set; }

        [Description("学分")]
        public float? Credit { get; set; }

        [Description("上课时间")]
        public string? UpDate { get; set; }

        [Description("上课周数")]
        public int? Weeks { get; set; }

        [Description("额外描述")]
        public string? ExtraInfo { get; set; }

        public DateTime CreatedAt { get; set; } = DateTime.Now;

        [NotMapped]
        public List<TeacherWithCourse>? TeacherWithCourses { get; set; }
    }
}
